<?php
//echo asd;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Event Mangement</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
<!--
body {
	background-image: url(images/water-drop-with-ripple.jpg);
	background-repeat: repeat;
}
a:link {
	color: #FFFFFF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #FFFFFF;
}
a:hover {
	text-decoration: none;
	color: #FFFFFF;
}
a:active {
	text-decoration: none;
	color: #FFFFFF;
}
-->
</style></head>
<body>
<div id="wrapper">
	<div id="header">
	  <div id="logo">
	    <div align="center"><img src="images/watertitle.png" alt="" width="940" height="130" /></div>
	  </div>
	</div>
	<!-- end #header -->
	<div id="menu">
		<ul>
			<li> <a href="#">Home</a></li>
			<li><a href="#">About us</a></li>
			<li><a href="#">News</a></li>
			<li><a href="#">Events</a></li>
			<li><a href="#">Resources</a></li>
			<li><a href="#">Contact</a></li>
		</ul>
	</div>
	<!-- end #menu -->
	<div id="page">
	<div id="page-bgtop">
	<div id="page-bgbtm">
		<div id="content">
			<div class="post">
				<?php 
				//getting values from last page
				$eName=$_REQUEST['eName'];
                $date= $_REQUEST['date'];
                $venue=$_REQUEST['venue'];
                $sTime=$_REQUEST['sTime'];
                $eTime=$_REQUEST['eTime'];
				$path="pictureGallery/" . $_FILES["image"]["name"];;
				//echo "Hello".$date.$_POST['date'].$_POST['venue'];
				
				//uploading file
				
				if ((($_FILES["image"]["type"] == "image/gif") || ($_FILES["image"]["type"] == "image/jpeg") || ($_FILES["image"]["type"] == "image/pjpeg")) ){
                if ($_FILES["image"]["error"] > 0){
                echo "Return Code: " . $_FILES["image"]["error"] . "<br />";
                }
                else{
                        if (file_exists("pictureGallery/" . $_FILES["image"]["name"])){
                        	echo $_FILES["image"]["name"] . " already exists. ";
                }
                else{
                        move_uploaded_file($_FILES["image"]["tmp_name"], "pictureGallery/" . $_FILES["image"]["name"]);
						rename("pictureGallery/".$_FILES["image"]["name"],"pictureGallery/1.jpg");
                        
                }
        }
        }
        else{
          echo "Invalid file";
        }
        
        if($eName=="" | $date=="" | $venue=="" | $sTime=="" | $eTime="" | $path="")
        {
                ?><div align="center"><h1><?php echo "Enter Something!!!";?></h1></div>
        <?php
        }
        else
        {       //connection
   /*include 'dbcon.php';
                
        //insert into db
        $sql="INSERT INTO item(Name, Price, Quantity, Type, pathOfPicture) VALUES('$name','$price','$quantity','$type','$path')";
                if (mysql_query($sql,$con))
                {
                        echo "Record of Item ".$name." added successfully.";
                }
                else{
                        echo "Sorry! Try again...";
                        }
        mysql_close($con);      
       */ }
        

				?>
                
                
		
			  <div class="entry"></div>
			</div>
		</div>
		<!-- end #content -->
		<div id="sidebar">
			<ul>
				<li>
				  <div style="clear: both;">&nbsp;</div>
				</li>
				<li>
					<h2>&nbsp;</h2>
			  </li>
          </ul>
		    <p>&nbsp;</p
		    ><p>&nbsp;</p>
		    <p>&nbsp;</p>
		    <p>&nbsp;</p>
		    <p>&nbsp;</p>
		    <p>&nbsp;</p>
		</div>
		<!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	</div>
	</div>
	<!-- end #page -->
</div>
	<div id="footer">
		<p>Copyright (c) 2011,  All rights reserved. Design by The Urban Unit</a>.</p>
	</div>
	<!-- end #footer -->
</body>
</html>
<?php
//echo asd;
?>